Timeout Policies
BindAI supports a basic workflow timeout policy through the workflow executor. The current implementation checks elapsed workflow time before starting each node. If the configured timeout has been exceeded at that check, the executor fails the workflow. This is a cooperative timeout check, not a hard execution deadline. It does not interrupt a node that is already running, and thefail_workflow configuration field is not currently used.
Current Behavior
The workflow runtime provides aTimeoutPolicy configuration:
What Is Implemented
The current timeout implementation provides:- A
TimeoutPolicyconfiguration class - A configurable timeout duration through
seconds - An elapsed-time check in the workflow executor
- Workflow failure when the timeout is exceeded at the check
- Interrupting a node that is already running
- Guaranteed termination at the exact timeout boundary
- Automatic cancellation of an in-progress external operation
- A timeout-specific retry mechanism
- An independently running timeout monitor
fail_workflow field exists on TimeoutPolicy, but the executor does not currently use it to select different behavior.
Applications should not treat the timeout as a hard guarantee that all work will stop within the configured number of seconds.
Timeout Configuration
A timeout policy can be constructed as follows:
The
seconds field controls the timeout threshold used by the executor. The fail_workflow field does not currently change timeout handling.
The policy class defines these values, but the workflow execution context must be configured with the policy for the executor to apply it.
How the Timeout Check Works
The executor checks elapsed time before starting a workflow node. Conceptually:Workflow timeout.
Because the check occurs between node executions, the executor may not detect an exceeded timeout until the next check.
Timeout Is Not Hard Cancellation
The current timeout mechanism does not interrupt a node that is already running. For example, consider a node that makes a slow external request:Timeout vs Loop
BindAI supports workflow loops, but a timeout policy is not a substitute for an explicit loop termination condition. A loop might look like this:Timeout vs Retry
Timeout and retry policies address different execution concerns.- Timeout checks elapsed workflow time during execution.
- Retry handles exceptions raised during node execution when a retry policy is configured.
External Operations
BindAI supports external operations through tools and connection-backed integrations. For example:Long-Running Workflows
A workflow may contain operations that take a significant amount of time. The current timeout policy provides a way to detect excessive elapsed workflow time at executor checks, but it does not guarantee termination at the configured duration. For example, a policy configured with:Current BindAI V1 Scope
The current workflow runtime includes a basic timeout policy, with important limitations. The implementation provides elapsed-time checking and workflow failure when a timeout is detected. It does not provide hard interruption of running nodes, guaranteed termination at the configured boundary, or use of thefail_workflow field.
Other workflow capabilities, such as conditions, loops, parallel execution, join synchronization, and human tasks, are separate from the timeout mechanism.
Documentation Scope
This page documents the timeout behavior currently implemented and verified in the workflow runtime. It does not promise:- Hard cancellation of running nodes
- Immediate termination when the timeout expires
- Automatic cancellation of external operations
- Different failure behavior based on
fail_workflow
Summary
BindAI provides a basic workflow timeout policy throughTimeoutPolicy.
The executor checks elapsed time before starting each node and returns a workflow failure if the configured limit has been exceeded at that check.
The timeout is not a hard execution deadline: a node that is already running is not interrupted, and the fail_workflow field is currently unused.
Use this feature to detect excessive workflow duration, but do not rely on it as a substitute for operation-level timeouts or hard cancellation.